package com.jingdianjichi.practice.server.mapper;

import com.jingdianjichi.practice.server.entity.po.PracticeDetailPO;
import com.jingdianjichi.practice.server.entity.po.PracticeRankPO;
import com.jingdianjichi.practice.server.entity.po.PracticeSetDetailPO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * ClassName:PracticeDetailDao
 * Package:com.jingdianjichi.practice.server.mapper
 * Description:
 *
 * @Author fst
 * @Create 2025/1/18 20:35
 * @Version 1.0
 */
public interface PracticeDetailDao
{

    PracticeDetailPO selectDetail(@Param("practiceId") Long practiceId,
                                  @Param("subjectId") Long subjectId,
                                  @Param("loginId") String loginId);

    Integer selectCorretCount(Long practiceId);

    List<PracticeSetDetailPO> selectBySetId(Long setId);

    void insert(PracticeDetailPO practiceDetailPO);

    List<PracticeDetailPO> selectByPracticeId(Long practiceId);

    void update(PracticeDetailPO po);

    PracticeDetailPO selectAnswer(@Param("practiceId") Long practiceId, @Param("subjectId") Long subjectId);

    List<PracticeRankPO> getPracticeCount();

    void deleteByPracticeId(Long practiceId);
}
